<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 200px;
            height: 200px;
            margin: 100px auto;
            padding: 50px;
            border: 5px dashed red;
            background-color: yellow;
            background-image: url(images/bg.jpg);
            background-repeat: no-repeat;
            /*改修的是定位原点*/
            /*background-origin: border-box;*/
            background-origin: content-box;
            /*background: padding-box;*/
            /*background-position:*/

        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>